<!DOCTYPE html>
<html>

  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="../../css/mui.min.css" rel="stylesheet" />
    <link href="../../css/style.css" rel="stylesheet" />
    <style type="text/css" media="all">
    </style>
  </head>

  <body>
    <div class="mui-content">
      <div id='list' class="mui-group-list">
        <div class="mui-group-list-search mui-input-row mui-search">
          <input type="search" class="mui-input-clear mui-input-speech" placeholder="搜索产品">
        </div>
        <ul class="mui-table-view mui-grid-view" v-cloak>
          <partial name="item"></partial>
        </ul>
      </div>
    </div>
    <script type="text/x-template" id="item-template">
      <li v-on="tap:goTo({url:'./product_form.html',id:'product-form',waiting: {autoShow: true}},item)" v-repeat="item:list" class="mui-table-view-cell mui-media mui-col-xs-3">
        
        <img class="mui-media-object" v-attr="src:item.img||'../../images/yf.jpg'">
        <div class="mui-media-body">{{item.name}}</div>
      </li>
    </script>
    <script src="../../js/mui.min.js"></script>
    <script src="../../js/vue.min.js"></script>
    <script src="../../app/vue-html5.js"></script>
    <script src="../../js/lodash.min.js"></script>
    <script type="text/javascript" charset="utf-8">
      (function($, window, document, Vue, vm) {
        window.vm = vm = new Vue.PageVm({
          el: '.mui-content',
          name: 'page product_list',
          model: 'Products',
          partials: {
            item: '#item-template',
          },
          created: function() {
            this.loadList();
          },
          mixins: [Vue.mixins.ajax, Vue.mixins.list]
        });
      })(mui, window, document, Vue, window.vm = {});
    </script>
  </body>

</html>